<template>
	<view class="shoporder">
		<view class="navlist">

		</view>
		<view class="shoplist">

			<view class="shop_item" v-for="(item,index) in list" :key="index">
				<view class="goodsinfo">
					<view class="imgbox">
						<image :src="item.logo_url|getImg" mode=""></image>
					</view>
					<view class="infobox">
						<view class="title">
							{{item.name}}
						</view>
						<view class="num">
							单价 {{item.price}}
						</view>
					</view>
				</view>
				<view class="infobot">
					<text>状态</text>
					<text class="type" v-if="item.is_shelf == 1">已下架</text>
					<text class="type" v-else-if="item.is_shelf == 2">上架中</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	// import {
	// 	MyGoods
	// } from "@/api/user.js"
	export default {
		data() {
			return {
				isActive: 0,
				isShow: false,
				list: []
			}
		},
		onLoad() {
			this.MyGoods()
		},
		methods: {
			changeNav(index) {
				this.isActive = index
			},
			MyGoods() {
				MyGoods().then(res => {
					this.list = res.data
				})
			}


		}
	}
</script>

<style lang="scss">
	.shoporder {
		background-color: #1E201F;
		min-height: 100vh;
		height: 100%;

		.navlist {
			display: flex;
			justify-content: space-between;


			.nav_item {
				width: 50%;
				text-align: center;
				color: #777;
				height: 50px;
				line-height: 50px;
				background-color: #292B2A;
			}

			.active {
				color: #fff;
			}
		}

		.shoplist {
			.shop_text {
				text-align: center;
				color: #fff;
				font-size: 14px;
				padding: 30px 0;
			}

			.shop_item {
				background: #292B2A;
				margin: 0 auto;
				margin-top: 15px;
				width: 94%;
				border-radius: 5px;
				box-sizing: border-box;
				padding: 5px 10px;

				.goodsinfo {
					display: flex;
					align-items: center;
					margin-top: 10px;
					background-color: #292B2A;
					color: #fff;

					.imgbox {
						width: 110px;
						height: 110px;
						box-sizing: border-box;
						padding-left: 11px;

						image {
							width: 100%;
							height: 100%;
							border-radius: 5px;
						}
					}

					.infobox {
						flex: 1;
						margin-left: 2%;
						padding: 10px;
						box-sizing: border-box;

						.title {
							font-size: 14px;
							padding: 5px 0;
						}

						.content {
							font-size: 13px;
							color: #ccc;
							margin: 10px 0;
						}

						.num {
							text-align: right;
							font-size: 16px;
						}
					}
				}


				.title {
					color: #fff;
					font-size: 14px;
					padding: 10px 0;
					// border-bottom: 1px solid #ccc;

					text {
						margin-right: 5px;
					}
				}

				.infobox {
					.infoli {
						font-size: 14px;
						color: #fff;
						margin-top: 5px;

						text {
							margin-right: 5px;
						}
					}
				}

				.infobot {
					display: flex;
					justify-content: space-between;
					margin-top: 8px;
					border-top: 1px solid #ccc;
					padding: 10px 0;
					color: #fff;
					font-size: 14px;

					.type {
						border: 1px solid #ccc;
						padding: 2px 8px;
						border-radius: 10px;
					}
				}
			}
		}
	}
</style>